import random
number = random.randint(0,1000)
#print(number)
count = 0;
right = False
print('取值范围在0~1000,有10次机会哟~')
while not right:
    count += 1
    if count > 10:
        print('猜错次数不能大于10次哟，失败啦~');
        print('正确答案是：' ,number);
        right = True
        break
    
    guess = int(input('请输入一个整数：'))

    if guess > number:
        print('输入的太大(big)了')
    elif guess < number:
        print('输入的太小(small)了')
    else:
        right = True
        print('恭喜你猜对了,共猜了', count ,'次')
        print('但是没有任何惊喜给你')
else:
    print('循环结束啦')

print('结束')
